package com.neusoft.movie.v_movies.model;


import com.neusoft.movie.v_movies.common.Constants;
import com.neusoft.movie.v_movies.listener.RetrofitListener;
import com.neusoft.movie.v_movies.service.ActivityService;
import com.neusoft.movie.v_movies.service.MoviesService;

import retrofit2.Call;

/**
 * Created by Administrator on 2017/12/26.
 */

public class ActivityModel extends RetrofitBaseModel {
    private ActivityService activityService;


    public ActivityModel() {
        this.activityService = retrofit.create(ActivityService.class);
    }

    public void getActivitylist(RetrofitListener listener) {
        Call call = activityService.getActivitylist();
        bindCallback(call, listener, Constants.GETACTIVITYLIST);
    }

    public void getDetail(int act_id,RetrofitListener listener) {
        Call call = activityService.getDetail(act_id);
        bindCallback(call, listener, Constants.GETACTIVITYDETAIL);
    }

    public void enterActivity(int u_id,int act_id,String e_name,String e_email,
                              String e_address, String e_remarks,RetrofitListener listener) {
        Call call = activityService.enterActivity(u_id,act_id,e_name,e_email,e_address,e_remarks);
        bindCallback(call, listener, Constants.ENTERACTIVITY);
    }


}
